#!/bin/bash
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
bash Miniconda3-latest-Linux-aarch64.sh -b -u -p .
cd bin
cp -l conda /usr/bin/
conda init
source /root/.bashrc
conda env list
cd ..
rm Miniconda3-latest-Linux-aarch64.sh
conda create --name get-status python=3.13
conda activate get-status
conda install psutil
cd /home/python-script/

# 这就是我的同名脚本"../python/获取系统信息.py"
vim get-status-v7.py

python /home/python-script/get-status-v7.py > /tmp/get-status.out

#  ding_to是本目录中的钉钉发送ding_to.sh
ding_to 16619954624 "$(cat /tmp/get-status.out)"

crontab -l |grep  python
#
#0 18 * * * . /home/conda/etc/profile.d/conda.sh && conda activate get-status && (ip r |grep -o -P "(?<=src)[\.0-9 ]+(?=metric)") > /tmp/get-status.out && python /home/python-script/get-status-v7.py >> /tmp/get-status.out && /usr/bin/ding_to 16619954624 "$(cat /tmp/get-status.out)"
#
